home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_pyr_spikesup.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  74 lines

  1. # Jones 3D Cog Script
  2. #
  3. # pyr_SpikesUp.cog
  4. #
  5. # Player is killed when he falls on spikes that are up.
  6. #
  7. # [TRM] && [RKD]
  8. #
  9. # (C) 1998 LucasArts Entertainment Co. All Rights Reserved
  10. # ========================================================================================
  11.  
  12. symbols
  13.  
  14. message    startup
  15. message    entered
  16. message    touched
  17.  
  18. thing    spikes
  19. thing    deadindy    local
  20. thing    player        local
  21.  
  22. surface        spikefloor
  23.  
  24. template    tempRef=indy_sh_actor       local
  25.  
  26. keyframe    inDie=in_die_buckle.key     local
  27.  
  28. sound    sndDie=tem_temspikes_up_kill_c.wav      local
  29. sound    indyDie=Inxj033a.wav                    local
  30.  
  31. int        locked=0    local
  32. end
  33.  
  34. # ========================================================================================
  35.  
  36. code
  37. startup:
  38.     sleep(.01);
  39.     SetThingLight(spikes, '.2 .2 .4', .001, .01);
  40.  
  41.     return;
  42.  
  43. # ========================================================================================
  44.  
  45. entered:
  46. touched:
  47.     if (locked) return;
  48.     locked = 1;
  49.  
  50.     player = GetLocalPlayerThing();
  51.     
  52.     PlaySoundLocal(sndDie, 1.0, 0.0, 0x0, 0);
  53.     PlaySoundThing(indyDie, player, 1, -1, -1, 0);
  54.  
  55.     SetThingFlags(player, 0x10);
  56.  
  57.     deadIndy = CreateThing(tempRef, spikes);
  58.     CaptureThing(deadIndy);
  59.  
  60.     CopyPlayerHolsters(player, deadindy);
  61.     CopyOrient(player, deadIndy);
  62.                                         
  63.     # Show actor Indy and play Keyframe
  64.     ClearThingFlags(deadIndy, 0x80000);
  65.     PlayKey(deadIndy, inDie, 4, 0x14, 0);
  66.  
  67.     DamageThing(player, 1000.0, 0x1, player);
  68.     sleep(.01);
  69.  
  70.     return;
  71.  
  72. end
  73.  
  74.